<?php
// +----------------------------------------------------------------------
// | HkCms 系统初始化
// +----------------------------------------------------------------------
// | Copyright (c) 2020-2021 http://www.hkcms.cn, All rights reserved.
// +----------------------------------------------------------------------
// | Author: 广州恒企教育科技有限公司 <admin@hkcms.cn>
// +----------------------------------------------------------------------

declare (strict_types = 1);

namespace app\common\event;

class AppInit
{
    public function handle($handle)
    {
        if (\think\facade\Db::name('config')->where('name','=','dev')->cache('')->value('value')=='enable') {
            // 重置为调试模式
            app()->debug();
            app()->env->set('app_debug','true');
        }
    }
}